<template>
  <el-header>
    <h1>
      <router-link to="/">
        <img src="@/assets/logo.png" alt="">
      </router-link>
      <span>
        <a href="https://gitee.com/jiangxia0yu">JiangXia0yu</a>
      </span>
    </h1>
    <div class="time">
      最新更新时间：{{updateTime}}
    </div>
  </el-header>
</template>

<script>
export default {
  data() {
    return {
      updateTime: ''
    }
  },
  created() {
    let arr = JSON.parse(localStorage.getItem('showapi_res_body'))
    this.updateTime = arr.updateTime
  }
}
</script>

<style lang="scss" scoped>
.el-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(64,158,255,0.7);
  h1 {
    display: flex;
    align-items: center;
    width: 80%;
    height: 100%;
    a {
      height: 60px;
      margin-right: 10px;
    }
    img {
      width: 60px;
    }
  }
  .time {
    width: 20%;
    text-align: center;
  }
}
</style>